package com.ljy.my_study.commons;

import java.lang.reflect.InvocationTargetException;

import org.apache.commons.beanutils.BeanUtils;

public class BeanUtilsMain {
	public static void main(String[] args) {
		A a=new A();
		a.setName("James");
		a.setAge(20);
		B b=new B();
		try {
			BeanUtils.copyProperties(b, a);
		} catch (IllegalAccessException | InvocationTargetException e) {
			e.printStackTrace();
		}
	}
}
